<!-- Generated automatically from an XML file of the same name.
     Copyright: Stephen J. Sangwine and Nicolas Le Bihan, 2008-2011.
--><html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <title>imreadq :: Functions (Quaternion Toolbox Function Reference)
</title><link rel="stylesheet" href="qtfmstyle.css" type="text/css"></head><body><h1>Quaternion Function Reference</h1><h2>imreadq</h2>
<p>Read an image file into a quaternion array.</p>
<h2>Syntax</h2><p><tt>A = imreadq(filename, fmt)</tt></p>
<h2>Description</h2>
    <p>
        <tt>imreadq</tt> reads an image file into a pure
        quaternion array. It supports the same parameter profiles as the MATLAB&reg;
        function <tt>imread</tt>, but returns a quaternion
        array with elements of type <tt>uint8</tt> or
        <tt>uint16</tt> depending on whether the image file contained
        8-bit or 16-bit samples.
    </p>
    <p>
        The function supports only RGB images, and returns a pure quaternion array.
        The parameter profiles supported are the same as for the MATLAB&reg;
        function <tt>imread</tt> but not all parameter profiles may
        make sense. This is because the MATLAB&reg; function is used to perform
        the file read, and the data is then converted into pure quaternion format.
        No scaling or casting of the component values is done.
    </p>
    <p>
        The function supports the same image file types as the MATLAB&reg; function <tt>imread</tt>.
    </p>

<h2>Examples</h2>
<pre>
&gt;&gt; A = imreadq('random.png')
 
A = 128x128 pure quaternion array with uint8 components
</pre>

<h2>See Also</h2>MATLAB&reg; function: <a href="matlab:doc imread">imread</a><br>QTFM functions: <a href="imwrite.html">imwrite</a>, <a href="image.html">image</a><br>
<h4>&copy; 2008-2011 Stephen J. Sangwine and Nicolas Le Bihan</h4><p><a href="license.html">License terms.</a></p></body></html>